package com.google.code.mochaccino.framework.xml.stax;
/*
 * Copyright 2012 Claude Houle claude.houle@gmail.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import java.util.Collection;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import javax.xml.stream.events.Attribute;
import org.xml.sax.Attributes;

/**
 * This interface contains a super-set of methods
 * useful when using a XML Stream Writer. This is the type
 * of method signature that will be needed while streaming
 * a complex XML document.
 */
public interface StAXWriter extends XMLStreamWriter {
	/** Write an Attribute */
	void writeAttribute( Attribute attr ) throws XMLStreamException;

	/** Write Attributes */
	void writeAttribute( Collection<Attribute> attr ) throws XMLStreamException;

	/** Write SAX Attribute */
	void writeAttribute( org.xml.sax.Attributes attr ) throws XMLStreamException;

	/** Write an Attribute */
	<T> void writeAttribute( String prefix, String ns, String name, T value ) throws XMLStreamException;

	/** Write an Attribute */
	<T> void writeAttribute( String ns, String name, T value ) throws XMLStreamException;

	/** Write an Attribute */
	<T> void writeAttribute( String name, T value ) throws XMLStreamException;

	/** Write an object into it's XML string representation */
	<T> void writeCharacters( T value ) throws XMLStreamException;

	/** Write an Element with specified string as a value */
	void writeElement( String name, String value ) throws XMLStreamException;

	/** Write an Element with specified string as a value with attribute */
	void writeElement( String name, String value, Attributes attr ) throws XMLStreamException;

	/** Write an Element with specified string as a value with attributes */
	void writeElement( String name, String value, Collection<Attribute> attr ) throws XMLStreamException;

	/** Write an Element with specified string as a value */
	void writeElement( String ns, String name, String value ) throws XMLStreamException;

	/** Write an Element with specified string as a value with attribute */
	void writeElement( String ns, String name, String value, Attributes attr ) throws XMLStreamException;

	/** Write an Element with specified string as a value with attributes */
	void writeElement( String ns, String name, String value, Collection<Attribute> attr ) throws XMLStreamException;

	/** Write an Element with specified string as a value */
	void writeElement( String prefix, String ns, String name, String value ) throws XMLStreamException;

	/** Write an Element with specified string as a value with attribute */
	void writeElement( String prefix, String ns, String name, String value, Attributes attr ) throws XMLStreamException;

	/** Write an Element with specified string as a value with attributes */
	void writeElement( String prefix, String ns, String name, String value, Collection<Attribute> attr ) throws XMLStreamException;

	/** Write an Element with specified object as a value */
	<T> void writeElement( String prefix, String ns, String name, T value ) throws XMLStreamException;

	/** Write an Element with specified object as a value with attribute */
	<T> void writeElement( String prefix, String ns, String name, T value, Attributes attr ) throws XMLStreamException;

	/** Write an Element with specified object as a value with attributes */
	<T> void writeElement( String prefix, String ns, String name, T value, Collection<Attribute> attr ) throws XMLStreamException;

	/** Write an Element with specified object as a value */
	<T> void writeElement( String ns, String name, T value ) throws XMLStreamException;

	/** Write an Element with specified object as a value with attribute */
	<T> void writeElement( String ns, String name, T value, Attributes attr ) throws XMLStreamException;

	/** Write an Element with specified object as a value with attributes */
	<T> void writeElement( String ns, String name, T value, Collection<Attribute> attr ) throws XMLStreamException;

	/** Write an Element with specified object as a value */
	<T> void writeElement( String name, T value ) throws XMLStreamException;

	/** Write an Element with specified object as a value with attribute */
	<T> void writeElement( String name, T value, Attributes attr ) throws XMLStreamException;

	/** Write an Element with specified object as a value with attributes */
	<T> void writeElement( String name, T value, Collection<Attribute> attr ) throws XMLStreamException;

	/** Write an Element with attribute */
	void writeEmptyElement( String name, Attributes attr ) throws XMLStreamException;

	/** Write an Element with attributes */
	void writeEmptyElement( String name, Collection<Attribute> attr ) throws XMLStreamException;

	/** Write an Element with attributes */
	void writeEmptyElement( String ns, String name, Attributes attr ) throws XMLStreamException;

	/** Write an Element with attribute */
	void writeEmptyElement( String ns, String name, Collection<Attribute> attr ) throws XMLStreamException;

	/** Write an Element with attributes */
	void writeEmptyElement( String prefix, String name, String ns, Attributes attr ) throws XMLStreamException;

	/** Write an Element with attribute */
	void writeEmptyElement( String prefix, String name, String ns, Collection<Attribute> attr ) throws XMLStreamException;
}